/*
 * @Author: your name
 * @Date: 2022-03-21 21:04:31
 * @LastEditTime: 2022-04-18 05:33:32
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \react-antd-admin\vue-admin-template\src\api\privilege.js
 */
import request from '@/utils/request';

// 获取所有权限树
export function getPrivilegeTree() {
  return request({
    url: '/privilege/findPrivilegeTree',
    method: 'get'
  })
}

// 新增
export function createPrivilege(data) {
  return request({
    url: '/privilege/createPrivilege',
    method: 'post',
    data
  })
}
// 删除
export function deletePrivilegeById(data) {
  return request({
    url: '/privilege/deletePrivilegeById',
    method: 'delete',
    data
  })
}
export function updatePrivilege(data) {
  return request({
    url: '/privilege/updatePrivilege',
    method: 'post',
    data
  })
}